package copyCollectionsDemo;

import java.util.HashMap;

public class Demo3 {
	public static void main(String args[]){
		HashMap<String,Person> map1 = new HashMap<String,Person>();
		map1.put("NO1", new Person());
		map1.put("only", new Person());
		
		//复制
		HashMap<String, Person> copyMap1 = new HashMap<String, Person>(map1);
		System.out.println(map1);
		System.out.println(copyMap1);
	}
}
class Person {
	int age =18;
}